package qldc.pm.tienan.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.DateUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.BaseModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.util.PortalUtil;

import qldc.pm.tienan.service.ClpSerializer;
import qldc.pm.tienan.service.TEMP_TienAnLocalServiceUtil;

import java.io.Serializable;

import java.lang.reflect.Method;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;


public class TEMP_TienAnClp extends BaseModelImpl<TEMP_TienAn>
    implements TEMP_TienAn {
    private long _tienAnId;
    private long _userId;
    private String _userUuid;
    private String _userName;
    private Date _createDate;
    private Date _modifiedDate;
    private long _doiTuongTienAnId;
    private String _toaAnXuPhat;
    private Date _ngayToaAn;
    private String _toiDanh;
    private Date _ngayPhamToi;
    private boolean _xoaAnTich;
    private String _chuThich;
    private String _hinhPhatChinh;
    private String _hinhPhatBoSung;
    private String _nghiaVuDanSu;
    private String _anPhi;
    private String _banAnSo;
    private String _moTaTienAn;
    private String _undoRedo;
    private String _thaoTac;
    private long _mainTienAnId;
    private BaseModel<?> _temp_TienAnRemoteModel;

    public TEMP_TienAnClp() {
    }

    @Override
    public Class<?> getModelClass() {
        return TEMP_TienAn.class;
    }

    @Override
    public String getModelClassName() {
        return TEMP_TienAn.class.getName();
    }

    @Override
    public long getPrimaryKey() {
        return _tienAnId;
    }

    @Override
    public void setPrimaryKey(long primaryKey) {
        setTienAnId(primaryKey);
    }

    @Override
    public Serializable getPrimaryKeyObj() {
        return _tienAnId;
    }

    @Override
    public void setPrimaryKeyObj(Serializable primaryKeyObj) {
        setPrimaryKey(((Long) primaryKeyObj).longValue());
    }

    @Override
    public Map<String, Object> getModelAttributes() {
        Map<String, Object> attributes = new HashMap<String, Object>();

        attributes.put("tienAnId", getTienAnId());
        attributes.put("userId", getUserId());
        attributes.put("userName", getUserName());
        attributes.put("createDate", getCreateDate());
        attributes.put("modifiedDate", getModifiedDate());
        attributes.put("doiTuongTienAnId", getDoiTuongTienAnId());
        attributes.put("toaAnXuPhat", getToaAnXuPhat());
        attributes.put("ngayToaAn", getNgayToaAn());
        attributes.put("toiDanh", getToiDanh());
        attributes.put("ngayPhamToi", getNgayPhamToi());
        attributes.put("xoaAnTich", getXoaAnTich());
        attributes.put("chuThich", getChuThich());
        attributes.put("hinhPhatChinh", getHinhPhatChinh());
        attributes.put("hinhPhatBoSung", getHinhPhatBoSung());
        attributes.put("nghiaVuDanSu", getNghiaVuDanSu());
        attributes.put("anPhi", getAnPhi());
        attributes.put("banAnSo", getBanAnSo());
        attributes.put("moTaTienAn", getMoTaTienAn());
        attributes.put("undoRedo", getUndoRedo());
        attributes.put("thaoTac", getThaoTac());
        attributes.put("mainTienAnId", getMainTienAnId());

        return attributes;
    }

    @Override
    public void setModelAttributes(Map<String, Object> attributes) {
        Long tienAnId = (Long) attributes.get("tienAnId");

        if (tienAnId != null) {
            setTienAnId(tienAnId);
        }

        Long userId = (Long) attributes.get("userId");

        if (userId != null) {
            setUserId(userId);
        }

        String userName = (String) attributes.get("userName");

        if (userName != null) {
            setUserName(userName);
        }

        Date createDate = (Date) attributes.get("createDate");

        if (createDate != null) {
            setCreateDate(createDate);
        }

        Date modifiedDate = (Date) attributes.get("modifiedDate");

        if (modifiedDate != null) {
            setModifiedDate(modifiedDate);
        }

        Long doiTuongTienAnId = (Long) attributes.get("doiTuongTienAnId");

        if (doiTuongTienAnId != null) {
            setDoiTuongTienAnId(doiTuongTienAnId);
        }

        String toaAnXuPhat = (String) attributes.get("toaAnXuPhat");

        if (toaAnXuPhat != null) {
            setToaAnXuPhat(toaAnXuPhat);
        }

        Date ngayToaAn = (Date) attributes.get("ngayToaAn");

        if (ngayToaAn != null) {
            setNgayToaAn(ngayToaAn);
        }

        String toiDanh = (String) attributes.get("toiDanh");

        if (toiDanh != null) {
            setToiDanh(toiDanh);
        }

        Date ngayPhamToi = (Date) attributes.get("ngayPhamToi");

        if (ngayPhamToi != null) {
            setNgayPhamToi(ngayPhamToi);
        }

        Boolean xoaAnTich = (Boolean) attributes.get("xoaAnTich");

        if (xoaAnTich != null) {
            setXoaAnTich(xoaAnTich);
        }

        String chuThich = (String) attributes.get("chuThich");

        if (chuThich != null) {
            setChuThich(chuThich);
        }

        String hinhPhatChinh = (String) attributes.get("hinhPhatChinh");

        if (hinhPhatChinh != null) {
            setHinhPhatChinh(hinhPhatChinh);
        }

        String hinhPhatBoSung = (String) attributes.get("hinhPhatBoSung");

        if (hinhPhatBoSung != null) {
            setHinhPhatBoSung(hinhPhatBoSung);
        }

        String nghiaVuDanSu = (String) attributes.get("nghiaVuDanSu");

        if (nghiaVuDanSu != null) {
            setNghiaVuDanSu(nghiaVuDanSu);
        }

        String anPhi = (String) attributes.get("anPhi");

        if (anPhi != null) {
            setAnPhi(anPhi);
        }

        String banAnSo = (String) attributes.get("banAnSo");

        if (banAnSo != null) {
            setBanAnSo(banAnSo);
        }

        String moTaTienAn = (String) attributes.get("moTaTienAn");

        if (moTaTienAn != null) {
            setMoTaTienAn(moTaTienAn);
        }

        String undoRedo = (String) attributes.get("undoRedo");

        if (undoRedo != null) {
            setUndoRedo(undoRedo);
        }

        String thaoTac = (String) attributes.get("thaoTac");

        if (thaoTac != null) {
            setThaoTac(thaoTac);
        }

        Long mainTienAnId = (Long) attributes.get("mainTienAnId");

        if (mainTienAnId != null) {
            setMainTienAnId(mainTienAnId);
        }
    }

    @Override
    public long getTienAnId() {
        return _tienAnId;
    }

    @Override
    public void setTienAnId(long tienAnId) {
        _tienAnId = tienAnId;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setTienAnId", long.class);

                method.invoke(_temp_TienAnRemoteModel, tienAnId);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public long getUserId() {
        return _userId;
    }

    @Override
    public void setUserId(long userId) {
        _userId = userId;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setUserId", long.class);

                method.invoke(_temp_TienAnRemoteModel, userId);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getUserUuid() throws SystemException {
        return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
    }

    @Override
    public void setUserUuid(String userUuid) {
        _userUuid = userUuid;
    }

    @Override
    public String getUserName() {
        return _userName;
    }

    @Override
    public void setUserName(String userName) {
        _userName = userName;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setUserName", String.class);

                method.invoke(_temp_TienAnRemoteModel, userName);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public Date getCreateDate() {
        return _createDate;
    }

    @Override
    public void setCreateDate(Date createDate) {
        _createDate = createDate;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setCreateDate", Date.class);

                method.invoke(_temp_TienAnRemoteModel, createDate);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public Date getModifiedDate() {
        return _modifiedDate;
    }

    @Override
    public void setModifiedDate(Date modifiedDate) {
        _modifiedDate = modifiedDate;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setModifiedDate", Date.class);

                method.invoke(_temp_TienAnRemoteModel, modifiedDate);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public long getDoiTuongTienAnId() {
        return _doiTuongTienAnId;
    }

    @Override
    public void setDoiTuongTienAnId(long doiTuongTienAnId) {
        _doiTuongTienAnId = doiTuongTienAnId;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setDoiTuongTienAnId",
                        long.class);

                method.invoke(_temp_TienAnRemoteModel, doiTuongTienAnId);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getToaAnXuPhat() {
        return _toaAnXuPhat;
    }

    @Override
    public void setToaAnXuPhat(String toaAnXuPhat) {
        _toaAnXuPhat = toaAnXuPhat;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setToaAnXuPhat", String.class);

                method.invoke(_temp_TienAnRemoteModel, toaAnXuPhat);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public Date getNgayToaAn() {
        return _ngayToaAn;
    }

    @Override
    public void setNgayToaAn(Date ngayToaAn) {
        _ngayToaAn = ngayToaAn;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setNgayToaAn", Date.class);

                method.invoke(_temp_TienAnRemoteModel, ngayToaAn);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getToiDanh() {
        return _toiDanh;
    }

    @Override
    public void setToiDanh(String toiDanh) {
        _toiDanh = toiDanh;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setToiDanh", String.class);

                method.invoke(_temp_TienAnRemoteModel, toiDanh);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public Date getNgayPhamToi() {
        return _ngayPhamToi;
    }

    @Override
    public void setNgayPhamToi(Date ngayPhamToi) {
        _ngayPhamToi = ngayPhamToi;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setNgayPhamToi", Date.class);

                method.invoke(_temp_TienAnRemoteModel, ngayPhamToi);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public boolean getXoaAnTich() {
        return _xoaAnTich;
    }

    @Override
    public boolean isXoaAnTich() {
        return _xoaAnTich;
    }

    @Override
    public void setXoaAnTich(boolean xoaAnTich) {
        _xoaAnTich = xoaAnTich;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setXoaAnTich", boolean.class);

                method.invoke(_temp_TienAnRemoteModel, xoaAnTich);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getChuThich() {
        return _chuThich;
    }

    @Override
    public void setChuThich(String chuThich) {
        _chuThich = chuThich;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setChuThich", String.class);

                method.invoke(_temp_TienAnRemoteModel, chuThich);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getHinhPhatChinh() {
        return _hinhPhatChinh;
    }

    @Override
    public void setHinhPhatChinh(String hinhPhatChinh) {
        _hinhPhatChinh = hinhPhatChinh;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setHinhPhatChinh", String.class);

                method.invoke(_temp_TienAnRemoteModel, hinhPhatChinh);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getHinhPhatBoSung() {
        return _hinhPhatBoSung;
    }

    @Override
    public void setHinhPhatBoSung(String hinhPhatBoSung) {
        _hinhPhatBoSung = hinhPhatBoSung;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setHinhPhatBoSung",
                        String.class);

                method.invoke(_temp_TienAnRemoteModel, hinhPhatBoSung);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getNghiaVuDanSu() {
        return _nghiaVuDanSu;
    }

    @Override
    public void setNghiaVuDanSu(String nghiaVuDanSu) {
        _nghiaVuDanSu = nghiaVuDanSu;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setNghiaVuDanSu", String.class);

                method.invoke(_temp_TienAnRemoteModel, nghiaVuDanSu);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getAnPhi() {
        return _anPhi;
    }

    @Override
    public void setAnPhi(String anPhi) {
        _anPhi = anPhi;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setAnPhi", String.class);

                method.invoke(_temp_TienAnRemoteModel, anPhi);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getBanAnSo() {
        return _banAnSo;
    }

    @Override
    public void setBanAnSo(String banAnSo) {
        _banAnSo = banAnSo;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setBanAnSo", String.class);

                method.invoke(_temp_TienAnRemoteModel, banAnSo);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getMoTaTienAn() {
        return _moTaTienAn;
    }

    @Override
    public void setMoTaTienAn(String moTaTienAn) {
        _moTaTienAn = moTaTienAn;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setMoTaTienAn", String.class);

                method.invoke(_temp_TienAnRemoteModel, moTaTienAn);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getUndoRedo() {
        return _undoRedo;
    }

    @Override
    public void setUndoRedo(String undoRedo) {
        _undoRedo = undoRedo;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setUndoRedo", String.class);

                method.invoke(_temp_TienAnRemoteModel, undoRedo);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public String getThaoTac() {
        return _thaoTac;
    }

    @Override
    public void setThaoTac(String thaoTac) {
        _thaoTac = thaoTac;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setThaoTac", String.class);

                method.invoke(_temp_TienAnRemoteModel, thaoTac);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    @Override
    public long getMainTienAnId() {
        return _mainTienAnId;
    }

    @Override
    public void setMainTienAnId(long mainTienAnId) {
        _mainTienAnId = mainTienAnId;

        if (_temp_TienAnRemoteModel != null) {
            try {
                Class<?> clazz = _temp_TienAnRemoteModel.getClass();

                Method method = clazz.getMethod("setMainTienAnId", long.class);

                method.invoke(_temp_TienAnRemoteModel, mainTienAnId);
            } catch (Exception e) {
                throw new UnsupportedOperationException(e);
            }
        }
    }

    public BaseModel<?> getTEMP_TienAnRemoteModel() {
        return _temp_TienAnRemoteModel;
    }

    public void setTEMP_TienAnRemoteModel(BaseModel<?> temp_TienAnRemoteModel) {
        _temp_TienAnRemoteModel = temp_TienAnRemoteModel;
    }

    public Object invokeOnRemoteModel(String methodName,
        Class<?>[] parameterTypes, Object[] parameterValues)
        throws Exception {
        Object[] remoteParameterValues = new Object[parameterValues.length];

        for (int i = 0; i < parameterValues.length; i++) {
            if (parameterValues[i] != null) {
                remoteParameterValues[i] = ClpSerializer.translateInput(parameterValues[i]);
            }
        }

        Class<?> remoteModelClass = _temp_TienAnRemoteModel.getClass();

        ClassLoader remoteModelClassLoader = remoteModelClass.getClassLoader();

        Class<?>[] remoteParameterTypes = new Class[parameterTypes.length];

        for (int i = 0; i < parameterTypes.length; i++) {
            if (parameterTypes[i].isPrimitive()) {
                remoteParameterTypes[i] = parameterTypes[i];
            } else {
                String parameterTypeName = parameterTypes[i].getName();

                remoteParameterTypes[i] = remoteModelClassLoader.loadClass(parameterTypeName);
            }
        }

        Method method = remoteModelClass.getMethod(methodName,
                remoteParameterTypes);

        Object returnValue = method.invoke(_temp_TienAnRemoteModel,
                remoteParameterValues);

        if (returnValue != null) {
            returnValue = ClpSerializer.translateOutput(returnValue);
        }

        return returnValue;
    }

    @Override
    public void persist() throws SystemException {
        if (this.isNew()) {
            TEMP_TienAnLocalServiceUtil.addTEMP_TienAn(this);
        } else {
            TEMP_TienAnLocalServiceUtil.updateTEMP_TienAn(this);
        }
    }

    @Override
    public TEMP_TienAn toEscapedModel() {
        return (TEMP_TienAn) ProxyUtil.newProxyInstance(TEMP_TienAn.class.getClassLoader(),
            new Class[] { TEMP_TienAn.class }, new AutoEscapeBeanHandler(this));
    }

    @Override
    public Object clone() {
        TEMP_TienAnClp clone = new TEMP_TienAnClp();

        clone.setTienAnId(getTienAnId());
        clone.setUserId(getUserId());
        clone.setUserName(getUserName());
        clone.setCreateDate(getCreateDate());
        clone.setModifiedDate(getModifiedDate());
        clone.setDoiTuongTienAnId(getDoiTuongTienAnId());
        clone.setToaAnXuPhat(getToaAnXuPhat());
        clone.setNgayToaAn(getNgayToaAn());
        clone.setToiDanh(getToiDanh());
        clone.setNgayPhamToi(getNgayPhamToi());
        clone.setXoaAnTich(getXoaAnTich());
        clone.setChuThich(getChuThich());
        clone.setHinhPhatChinh(getHinhPhatChinh());
        clone.setHinhPhatBoSung(getHinhPhatBoSung());
        clone.setNghiaVuDanSu(getNghiaVuDanSu());
        clone.setAnPhi(getAnPhi());
        clone.setBanAnSo(getBanAnSo());
        clone.setMoTaTienAn(getMoTaTienAn());
        clone.setUndoRedo(getUndoRedo());
        clone.setThaoTac(getThaoTac());
        clone.setMainTienAnId(getMainTienAnId());

        return clone;
    }

    @Override
    public int compareTo(TEMP_TienAn temp_TienAn) {
        int value = 0;

        value = DateUtil.compareTo(getCreateDate(), temp_TienAn.getCreateDate());

        value = value * -1;

        if (value != 0) {
            return value;
        }

        return 0;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof TEMP_TienAnClp)) {
            return false;
        }

        TEMP_TienAnClp temp_TienAn = (TEMP_TienAnClp) obj;

        long primaryKey = temp_TienAn.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return (int) getPrimaryKey();
    }

    @Override
    public String toString() {
        StringBundler sb = new StringBundler(43);

        sb.append("{tienAnId=");
        sb.append(getTienAnId());
        sb.append(", userId=");
        sb.append(getUserId());
        sb.append(", userName=");
        sb.append(getUserName());
        sb.append(", createDate=");
        sb.append(getCreateDate());
        sb.append(", modifiedDate=");
        sb.append(getModifiedDate());
        sb.append(", doiTuongTienAnId=");
        sb.append(getDoiTuongTienAnId());
        sb.append(", toaAnXuPhat=");
        sb.append(getToaAnXuPhat());
        sb.append(", ngayToaAn=");
        sb.append(getNgayToaAn());
        sb.append(", toiDanh=");
        sb.append(getToiDanh());
        sb.append(", ngayPhamToi=");
        sb.append(getNgayPhamToi());
        sb.append(", xoaAnTich=");
        sb.append(getXoaAnTich());
        sb.append(", chuThich=");
        sb.append(getChuThich());
        sb.append(", hinhPhatChinh=");
        sb.append(getHinhPhatChinh());
        sb.append(", hinhPhatBoSung=");
        sb.append(getHinhPhatBoSung());
        sb.append(", nghiaVuDanSu=");
        sb.append(getNghiaVuDanSu());
        sb.append(", anPhi=");
        sb.append(getAnPhi());
        sb.append(", banAnSo=");
        sb.append(getBanAnSo());
        sb.append(", moTaTienAn=");
        sb.append(getMoTaTienAn());
        sb.append(", undoRedo=");
        sb.append(getUndoRedo());
        sb.append(", thaoTac=");
        sb.append(getThaoTac());
        sb.append(", mainTienAnId=");
        sb.append(getMainTienAnId());
        sb.append("}");

        return sb.toString();
    }

    @Override
    public String toXmlString() {
        StringBundler sb = new StringBundler(67);

        sb.append("<model><model-name>");
        sb.append("qldc.pm.tienan.model.TEMP_TienAn");
        sb.append("</model-name>");

        sb.append(
            "<column><column-name>tienAnId</column-name><column-value><![CDATA[");
        sb.append(getTienAnId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>userId</column-name><column-value><![CDATA[");
        sb.append(getUserId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>userName</column-name><column-value><![CDATA[");
        sb.append(getUserName());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>createDate</column-name><column-value><![CDATA[");
        sb.append(getCreateDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
        sb.append(getModifiedDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>doiTuongTienAnId</column-name><column-value><![CDATA[");
        sb.append(getDoiTuongTienAnId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>toaAnXuPhat</column-name><column-value><![CDATA[");
        sb.append(getToaAnXuPhat());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayToaAn</column-name><column-value><![CDATA[");
        sb.append(getNgayToaAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>toiDanh</column-name><column-value><![CDATA[");
        sb.append(getToiDanh());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayPhamToi</column-name><column-value><![CDATA[");
        sb.append(getNgayPhamToi());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>xoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>chuThich</column-name><column-value><![CDATA[");
        sb.append(getChuThich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hinhPhatChinh</column-name><column-value><![CDATA[");
        sb.append(getHinhPhatChinh());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hinhPhatBoSung</column-name><column-value><![CDATA[");
        sb.append(getHinhPhatBoSung());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>nghiaVuDanSu</column-name><column-value><![CDATA[");
        sb.append(getNghiaVuDanSu());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>anPhi</column-name><column-value><![CDATA[");
        sb.append(getAnPhi());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>banAnSo</column-name><column-value><![CDATA[");
        sb.append(getBanAnSo());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>moTaTienAn</column-name><column-value><![CDATA[");
        sb.append(getMoTaTienAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>undoRedo</column-name><column-value><![CDATA[");
        sb.append(getUndoRedo());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>thaoTac</column-name><column-value><![CDATA[");
        sb.append(getThaoTac());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>mainTienAnId</column-name><column-value><![CDATA[");
        sb.append(getMainTienAnId());
        sb.append("]]></column-value></column>");

        sb.append("</model>");

        return sb.toString();
    }
}
